package com.sara.service.impl;

import com.sara.entity.EmployeeLoginLog;
import com.sara.mapper.EmployeeLoginLogMapper;
import com.sara.service.EmployeeLoginLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmployeeLoginLogServiceImpl implements EmployeeLoginLogService {
    
    @Autowired
    private EmployeeLoginLogMapper employeeLoginLogMapper;
    
    @Override
    public void save(String remoteAddr, Integer id) {
        EmployeeLoginLog employeeLoginLog = new EmployeeLoginLog();
        employeeLoginLog.setLoginIp(remoteAddr);
        employeeLoginLog.setEmployeeId(id);
        employeeLoginLogMapper.insertSelective(employeeLoginLog);
    }
}
